package com.wondream.myframework.spring.cirular;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@Slf4j
public class CirculaReferenceTest {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("cicular-reference.xml");
        Object circularA = applicationContext.getBean("circularA");
//        log.info(ToStringBuilder.reflectionToString(circularA, ToStringStyle.JSON_STYLE));
        log.info(circularA.toString());
    }
}
